<template>
  <n-spin class="yzspin" :show="val.show">
    <template #description>
      <div class="yzdiv"><br />{{ val.loading_text }}</div></template
    >
    <div class="top_div" style="justify-content: center">
      <tempalte v-for="icon in val.save_icon?.split(',')">
        <img style="width: 35px" :src="cfg.function.ava(icon)" />
      </tempalte>
    </div>
    <n-hr />
    <div
      style="
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        font-size: 12.5px;
        justify-content: center;
        gap: 12px;
      "
    >
      <template v-for="item in val.pt_data">
        <div class="player_top_box">
          <div
            style="
              text-shadow: rgb(0, 0, 0) 0px 0px 3px;
              color: var(--base-font-hover-color);
              display: flex;
              align-items: center;
              justify-content: space-between;
            "
          >
            <span>等级 {{ item.level }}</span>
            <n-space>
              <n-button size="small" @click="ct.click_player_all_top(item.level)"
                >排名</n-button
              >
              <n-button
                size="small"
                @click="ct.player_dao(item.uid, val.qs.season, item.bid)"
                >查刀</n-button
              >
            </n-space>
          </div>
          <br />
          <div style="text-align: center">（冠军）{{ item.user }}</div>
          <n-hr />
          <div style="text-align: center; color: var(--base-font-hover-color)">
            伤害 {{ item.damage?.toLocaleString() }}
          </div>
        </div>
      </template>
    </div>
  </n-spin>
</template>

<script>
import { cfg } from "@/cfg/cfg.js";

export default {
  props: {
    val: {
      required: true,
    },
    ct: {
      required: true,
    },
  },
  setup(props) {
    return {
      cfg,
    };
  },
};
</script>
